var Logger = function() {

	var userAgent = navigator.userAgent.toLowerCase();
	var isFirefox = userAgent.search("firefox") > 0 ? 1 : 0;
	var isDebugEnabled = false;

	return {

		setDebugEnabled : function(enabled) {

			isDebugEnabled = enabled;
		},
		debug : function(s) {
			if (isFirefox && isDebugEnabled) {
				console.debug(s);
			}else{
				alert(s);
			}
		},
		error : function(s) {
			if (isFirefox && isDebugEnabled) {
				console.error(s);
			}else{
				alert(s);
			}
		}

	}

}();